package org.springblade.modules.admin.entity.es;

import lombok.Data;
import lombok.experimental.Accessors;
import org.dromara.easyes.annotation.HighLight;
import org.dromara.easyes.annotation.IndexField;
import org.dromara.easyes.annotation.IndexId;
import org.dromara.easyes.annotation.IndexName;
import org.dromara.easyes.annotation.rely.Analyzer;
import org.dromara.easyes.annotation.rely.FieldStrategy;
import org.dromara.easyes.annotation.rely.FieldType;
import org.dromara.easyes.annotation.rely.IdType;

@Data
@Accessors(chain = true)
@IndexName(value = "elevator_document", shardsNum = 3, replicasNum = 0, keepGlobalPrefix = true, maxResultWindow = 100)
public class ElevatorDocument {

	@IndexId(type = IdType.CUSTOMIZE)
	private Long id;

	@HighLight(mappingField = "highlightContent")
	@IndexField(fieldType = FieldType.TEXT, analyzer = Analyzer.STANDARD, searchAnalyzer = Analyzer.STANDARD)
	private String name;

	@HighLight(mappingField = "highlightContent")
	@IndexField(fieldType = FieldType.TEXT, analyzer = "custom_pinyin", searchAnalyzer = Analyzer.IK_MAX_WORD)
	private String namePinyin;

	@HighLight(mappingField = "aliasHighlightContent")
	@IndexField(fieldType = FieldType.TEXT, analyzer = Analyzer.STANDARD, searchAnalyzer = Analyzer.STANDARD, strategy = FieldStrategy.IGNORED)
	private String alias;

	@HighLight(mappingField = "aliasHighlightContent")
	@IndexField(fieldType = FieldType.TEXT, analyzer = "custom_pinyin", searchAnalyzer = Analyzer.IK_MAX_WORD, strategy = FieldStrategy.IGNORED)
	private String aliasPinyin;

	private String tenantId;

	private Long buildingId;

	private String highlightContent;

	private String aliasHighlightContent;
}
